projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
723705b
)
init-fs: Explicitly set /tmp to 01777
author
Colin Walters
<walters@verbum.org>
Fri, 30 Oct 2015 21:10:23 +0000
(17:10 -0400)
committer
Colin Walters
<walters@verbum.org>
Fri, 30 Oct 2015 21:11:09 +0000
(17:11 -0400)
I think most people were using tmpfs-on-tmp and so didn't hit this.
See https://bugzilla.redhat.com/show_bug.cgi?id=
1276775
src/ostree/ot-admin-builtin-init-fs.c
patch
|
blob
|
history
diff --git
a/src/ostree/ot-admin-builtin-init-fs.c
b/src/ostree/ot-admin-builtin-init-fs.c
index 71b3b55dfbaf9c9121af98e573927d621c4d7cde..0172f01c8e283119293ccdb016c24decd8917549 100644
(file)
--- a/
src/ostree/ot-admin-builtin-init-fs.c
+++ b/
src/ostree/ot-admin-builtin-init-fs.c
@@
-77,6
+77,16
@@
ot_admin_builtin_init_fs (int argc, char **argv, GCancellable *cancellable, GErr
child = g_file_get_child (dir, "tmp");
if (!gs_file_ensure_directory_mode (child, 01777, cancellable, error))
goto out;
+ /* FIXME - we should be using an API that explicitly ignores umask;
+ */
+ {
+ const char *path = gs_file_get_path_cached (child);
+ if (chmod (path, 01777) == -1)
+ {
+ gs_set_prefix_error_from_errno (error, errno, "chmod");
+ goto out;
+ }
+ }
g_clear_object (&child);
if (!ostree_sysroot_ensure_initialized (target_sysroot, cancellable, error))